home *** CD-ROM | disk | FTP | other *** search
Text File | 1997-04-18 | 34.4 KB | 1,412 lines |
- ; $VER: AHI Install 4.3 (15.4.97)
- ; Description: Installer script for the AHI audio system (© 1996, 1997 Martin Blom).
- ; Done my Martin Blom, partly based on Teemu Suikki's install script.
- ; Public domain.
-
- (set #complete 0)
- (set #completeadd (/ 1000 35)) ; There are 35 complete statements!
-
- (complete (/ #complete 10)) (set #complete (+ #complete #completeadd))
-
- (set #osversion (/ (getversion "exec.library" (resident)) 65536))
-
-
- ;**
- ;** All the strings
- ;**
-
- (set #t_welcome (cat
- " Welcome to the AHI installation. AHI is a retargetable"
- " audio systems that can be used with both the built-in"
- " sound chip (Paula) and several sound cards. This is version"
- " 4."
- ))
- (set #t_oldinstaller (cat
- " You have an old version of the Installer. I'll probably"
- " need version 43.3 or greater. You can continue anyway"
- " but there is no guarantee it will work as it's supposed"
- " to do.\n"
- " Do you wish to continue anyway?"
- ))
- (set #t_oldinstallerhelp (cat
- " The version of Installer you use is too old. You can"
- " find a more recent version on the Internet, for example"
- " on Aminet, in the util/misc directory. The current"
- " file name is \"Installer-43_3.lha\":\n"
- " <URL:ftp://ftp.germany.aminet.org/pub/aminet/util/misc/Installer-43_3.lha"
-
- ))
- (set #t_installaborted "Installation aborted.")
-
- (set #t_installing "Installing ")
- (set #t_installingdocs "Installing developer documentation")
- (set #t_installingincs "Installing include files")
- (set #t_installingsrc "Installing example source code")
- (set #t_nofiles "No files to install.")
-
- (set #t_nohelp "No help available.")
-
- (set #t_parts "Which parts of AHI do you wish to install?")
- (set #t_system "System files")
- (set #t_prefs "Preferences program")
- (set #t_audio "The AUDIO handler");
- (set #t_userdoc "User's documentation")
- (set #t_a-developer "Application developer files")
- (set #t_d-developer "Driver developer files")
- (set #t_userhelp (cat
- "System files:\n"
- " The system files. This is the heart of AHI and must be"
- " if for any of the other components to work.\n\n"
- "Preferences program:\n"
- " The preference program. Can be used to change many options"
- " in AHI. This part of AHI requires BGUI to be installed.\n\n"
- "The AUDIO handler:\n"
- " Allows you to play and record samples with the 'copy'"
- " command.\n\n"
- "User's documentation:\n"
- " An AmigaGuide® file descibing the AHI audio system and"
- " its components.\n\n"
- ))
- (set #t_devhelp (cat
- "Application developer files:\n"
- " Autodocs, include files, example source code etc."
- " Required if you wish to use AHI in your own applications.\n\n"
- "Driver developer files:\n"
- " Autodocs, example source code etc. Only required"
- " if you plan to write hardware drivers for sound"
- " cards.\n\n"
- ))
-
-
- (set #t_languages (cat
- "Which languages do you want to install?"
- " The built-in language is English."))
- (set #t_languageshelp (cat
- " If your language is not in the list, the author of AHI"
- " would be very happy if you made a translation. Edit the files"
- " User/Catalogs/NewCatalog.ct and User/Catalogs/NewPrefsCatalog.ct"
- " and send it to this address:\n"
- " lcs@lysator.liu.se\n\n"
- ))
-
- (set #t_drivers (cat
- "Which AHI drivers you want to install?"
- " It's better to install only the drivers you need."))
- (set #t_drivershelp (cat
- "Delfina:\n"
- " Delfina DSP sound card.\n\n"
- "Filesave:\n"
- " Read/Write sample data to a file.\n\n"
- "Paula:\n"
- " Regular Amiga sound hardware.\n\n"
- "Prelude:\n"
- " Prelude sound card.\n\n"
- "Toccata:\n"
- " Toccata sound card.\n\n"
- "Wavetools:\n"
- " Wavetools sound card.\n\n"
- ))
-
- (set #t_020ver "Do you want to install the 68020-optimized binaries?")
- (set #t_020verhelp (cat
- " 68020-optimized binaries are much faster, and often also"
- " smaller than plain 68000 versions. In the case of AHI,"
- " the 68000 versions have less features and reduced sound"
- " quality. It is strongly suggested that you use the"
- " 68020 versions of the binaries.\n\n"
- ))
-
- (set #t_devfiles "Which developer files do you wish to install?")
- (set #t_devdocs "Autodocs and AHI Developer's Guide")
- (set #t_source "Example source code")
- (set #t_asm "Assembler include files")
- (set #t_cgen "Generic C include files")
- (set #t_e "E module files")
- (set #t_fd "FD files")
- (set #t_ade "Extra ADE gcc include files")
- (set #t_sas "Extra SAS/C (and DICE) include files")
- (set #t_storm "Extra StormC include files")
- (set #t_devfileshelp (cat
- "Autodocs and AHI Developer's Guide:\n"
- " The autodocs and rules for programming AHI.\n\n"
- "Example source code:\n"
- " Some example programs, most of them are written in C, but"
- " there are some assembler sources too.\n\n"
- "Assembler include files:\n"
- " Include files needed if you program in assembler.\n\n"
- "Generic C include files:\n"
- " Include files needed if you program in C.\n\n"
- "E module files:\n"
- " The module files to use with AmigaE.\n\n"
- "FD files:\n"
- " Can be used with the 'lvo' tool, or when you build a"
- " hardware driver written in C.\n\n"
- "Extra ADE gcc include files:\n"
- " The special include files for gcc (inline, proto etc).\n\n"
- "Extra SAS/C (and DICE) include files:\n"
- " The special include files for SAS/C (pragmas, proto etc)."
- " They work with DCC too, but with no tag calls.\n\n"
- "Extra StormC include files:\n"
- " The special include files for StormC (pragma, proto etc).\n\n"
- ))
-
-
- (set #t_nodevs
- "Cannot find the Devs: assign. Try a higher userlevel instead.")
- (set #t_noc
- "Cannot find the C: assign. Try a higher userlevel instead.")
- (set #t_noprefs
- "Cannot find the Sys:Prefs directory. Try a higher userlevel instead.")
- (set #t_nol
- "Cannot find the L: assign. Try a higher userlevel instead.")
- (set #t_devspath "Where do you want to install the system files?")
- (set #t_devspathhelp (cat
- " The directory you select must be a part of your Devs: assign."
- " The installer will copy ahi.device, the hardware drivers"
- " and the audio mode description files to this directory."
- " Subdirectories for the drivers and mode files will be"
- " created.\n\n"
- ))
- (set #t_cpath "Where do you want to install AddAudioModes?")
- (set #t_cpathhelp (cat
- " AddAudioModes is a small command line utility that can"
- " be used to manipulate the database which contains the"
- " audio modes (much like the screenmode database)."
- " CLI programs are normally located in the C: directory.\n\n"
- ))
-
-
- (set #t_localepath "Where do you want to install the catalogs?")
- (set #t_localepathhelp (cat
- " The directory you select must be a part of your Locale: assign."
- " The installer will copy the catalogs you have selected to"
- " subdirectories in this directory.\n\n"
- ))
-
- (set #t_prefspath "Where do you want to install the preferences program?")
- (set #t_prefspathhelp (cat
- " The preferences program lets you configure AHI for your particular"
- " configuration. You can select which sound hardware you prefer"
- " to use, which physical inputs and outputs you wish to use"
- " etc. Preferences programs are normally located in the"
- " Sys:Prefs/ directory.\n"
- " This program requires BGUI.\n\n"
- ))
-
- (set #t_audiohelp (cat
- " The AUDIO handler is used to mount a device called AUDIO:. By"
- " copying files to and from this device, you can play and record"
- " raw sample data, IFF-AIFF or IFF-AIFC files.\n\n"
- ))
-
- (set #t_lpath "Where do you want to install the AUDIO handler?")
- (set #t_lpathhelp (cat
- #t_audiohelp
- " Handlers are normally located in the L: directory.\n\n"
- ))
-
- (set #t_dosdevpath "Where do you want to install the AUDIO mount entry?")
- (set #t_dosdevpathhelp (cat
- #t_audiohelp
- " Mount entries are normally located in the Devs:DOSDrivers"
- " directory if they are to be mounted at boot time. If not, they"
- " probably are in the SYS:Storage/DOSDrivers directory.\n\n"
- ))
-
- (set #t_dosdriver "Do you want the handler to be activated at boot time?")
- (set #t_dosdriverhelp (cat
- " If you want, the AUDIO: device can be made avaliable as soon as"
- " your system has been started. This saves you the effort of"
- " having to mount it manually when you want to use it. It does"
- " not require much memory to mount the device and it is therefor"
- " suggested that you select 'Yes'.\n\n"
- ))
-
- (set #t_userdocpath "Where do you want to install the user documentation?")
- (set #t_userdocpathhelp (cat
- " This is an AmigaGuide® file descibing the AHI audio system"
- " and its components.\n\n"
- ))
-
- (set #t_srcpath (cat
- " Where do you want to install the example source code?"
- " A directory called AHI will be created there."
- ))
- (set #t_srcpathhelp (cat
- " The example sources, in both C and assembler, will be"
- " stored in a subdirectory called AHI. Any files currently"
- " present in the AHI directory will be deleted!\n\n"
- ))
- (set #t_oldsrc (cat
- " There is already a directory called AHI here."
- " All files in it will be deleted."
- ))
-
- (set #t_devdocspath " Where do you want to store the developer documentation?")
- (set #t_devdocspathhelp (cat
- " The installer will place the autodoc files and the"
- " AHI Developer's Guide in the directory you select.\n\n"
- ))
-
- (set #t_aincpath " Where are your assembler include files located?")
- (set #t_aincpathhelp (cat
- " The installer will place the assembler include files"
- " in subdirectories (lvo, devices and libraries)"
- " of the one you select.\n\n"
- ))
-
- (set #t_fdpath " Where do you keep your FD-files?")
- (set #t_fdpathhelp (cat
- " FD-files are files describing a library's or a device's"
- " functions. They can be used with the 'lvo' program, and"
- " can also be useful if you write hardware drivers.\n\n"
- ))
-
- (set #t_cincpath " Where are your C include files located?")
- (set #t_cincpathhelp (cat
- " The installer will place the generic C include files"
- " in subdirectories (clib, devices and libraries)"
- " of the one you select.\n\n"
- ))
-
- (set #t_emodpath " Where are your E module files located?")
- (set #t_emodpathhhelp (cat
- " The installer will place the E module files in the directory"
- " and in subdirectories (devices and libraries)"
- " of the one you select.\n\n"
- ))
-
- (set #t_adeincpath " Where do you want to place the ADE gcc include files?")
- (set #t_adeincpathhelp (cat
- " gcc needs some extra files to find out which registers"
- " to use when calling AHI functions. That information is"
- " located in these files, which will be copied to the"
- " inline, pragmas and proto directories.\n\n"
- ))
-
- (set #t_sasincpath " Where do you want to place the SAS/C (and DICE) include files?")
- (set #t_sasincpathhelp (cat
- " SAS/C (and DICE) needs some extra files to find out which registers"
- " to use when calling AHI functions. That information is"
- " located in these files, which will be copied to the"
- " pragmas and proto directories.\n\n"
- ))
-
- (set #t_stormincpath " Where do you want to place the StormC include files?")
- (set #t_stormincpathhelp (cat
- " StormC needs some extra files to find out which registers"
- " to use when calling AHI functions. That information is"
- " located in these files, which will be copied to the"
- " pragma and proto directories.\n\n"
- ))
-
- (set #t_ahidevhelp (cat
- " ahi.device is the heart of the AHI"
- " audio system. This is the only part"
- " that other programs knows anything about.\n\n"
- ))
-
- (set #t_runaddmodes (cat
- " About to run AddAudioModes to recreate"
- " the audio modes database."
- ))
-
-
- (set #t_overwritemode1
- " There is already a copy of the audio mode descriptor ")
- (set #t_overwritemode2 " present in ")
- (set #t_overwritemode3 (cat
- ".\n\n"
- " Do you want to overwrite it?"
- " All changes you have done to to it will be lost!"
- ))
-
- ;(if (= @language "svenska")
- ;(
- ;))
-
-
- ;**
- ;** Procedures
- ;**
-
- (procedure P_INSTDRIVER #pi_audioname #pi_modename
- (
- (set #pi_drvpath (tackon #devspath "AHI/"))
- (set #pi_modepath (tackon #devspath "AudioModes/"))
- (if (not (exists #pi_drvpath))
- (makedir #pi_drvpath)
- )
- (if (not (exists #pi_modepath))
- (makedir #pi_modepath)
- )
-
- (if (exists (tackon "User/Devs/AHI" (cat #pi_audioname #ver68k)))
- (
- (set #pi_audionamesrc (cat #pi_audioname #ver68k))
- )
- (
- (set #pi_audionamesrc #pi_audioname)
- ))
-
- (copylib
- (help (cat #t_drivershelp @copylib-help))
- (prompt (cat #t_installing #pi_drvpath #pi_audionamesrc))
- (source (tackon "User/Devs/AHI" #pi_audionamesrc))
- (dest #pi_drvpath)
- (newname #pi_audioname)
- (confirm)
- )
-
- (set #pt_copymode 0)
- (if (exists (tackon #pi_modepath #pi_modename))
- (if (exists (tackon #pi_modepath #pi_modename))
- (
- ; (if (askbool
- ; (prompt (cat #t_overwritemode1
- ; #pi_modename
- ; #t_overwritemode2
- ; #pi_drvpath
- ; #t_overwritemode3
- ; ))
- ; (default 1)
- ; (help #t_drivershelp)
- ; )
- ; (
- (set #pt_copymode 1)
- ; ))
- ))
- ( ; else (exists)
- (set #pt_copymode 1)
- ))
- (if (= #pt_copymode 1)
- (
- (copyfiles
- (prompt (cat #t_installing #pi_modepath #pi_modename))
- (source (tackon "User/Devs/AudioModes" #pi_modename))
- (dest #pi_modepath)
- )
- ))
- ))
-
- (procedure P_INSTCATALOG #pi_language
- (
- (set #pi_dest (tackon (tackon #localepath "Catalogs") #pi_language))
- (copyfiles
- (prompt (cat #t_installing (tackon #pi_dest #pi_language)))
- (source (tackon "User/Catalogs" #pi_language))
- (dest #pi_dest)
- (all)
- )
- ))
-
- ;**
- ;** Main installation procedure starts here...
- ;**
-
- (set #system 1 ;System files
- #prefs 2 ;Preferences program
- #audio 4 ;The AHI handler
- #userdoc 8 ;User documentation
- #a-developer 16 ;App. programmers developer files
- #d-developer 32 ;Drv. programmers developer files
- )
- (set #delfina 1 ;Sound card drivers
- #filesave 2
- #paula 4
- #prelude 8
- #toccata 16
- #wavetools 32
- )
-
- (set #devdocs 1 ;Autodocs and programming guidelines
- #source 2 ;Example source code
- #asm 4 ;Assembler include files
- #cgen 8 ;Generic C include files
- #e 16 ;E module files
- #fd 32 ;FD-files
- #ade 64 ;ADE gcc include files
- #sas 128 ;SAS/C include files
- #storm 256 ;StormC include files
- )
-
- ;**
- ;** Make sure we're using a recent version of the installer
- ;**
-
- (if (< @installer-version (+ (* 43 65536) 3))
- (
- (if (not (askbool
- (prompt #t_oldinstaller)
- (help #t_oldinstallerhelp)
- ))
- (
- (abort (cat #t_installaborted "\n\n" #t_oldinstallerhelp))
- ))
- ))
-
- ;**
- ;** Welcome!
- ;**
-
- (welcome #t_welcome)
-
- ;**
- ;** Find out which parts should be installed
- ;**
-
- (set #default 0 #helptext "")
- (set #parts 0)
-
- (if (exists "User")
- (
- (set #helptext (cat #helptext #t_userhelp))
- (set #default (bitor #default #system #prefs #audio #userdoc))
- )
- ( ; else
- (set #t_system "")
- (set #t_prefs "")
- (set #t_audio "")
- (set #t_userdoc "")
-
- ))
-
- (if (exists "Developer")
- (
- (set #helptext (cat #helptext #t_devhelp))
- (set #default (bitor #default #a-developer))
- )
- ( ; else
- (set #t_a-developer "")
- (set #t_d-developer "")
- ))
-
- (if (= #default 0)
- (abort #t_nofiles)
- )
-
- (complete (/ #complete 10)) (set #complete (+ #complete #completeadd))
-
- ;**
- ;** Ask which parts should be installed
- ;**
-
- (if (= @user-level 0)
- (
- (set #parts #default)
- )
- ( ; Average or Expert
- (set #parts (askoptions
- (prompt #t_parts)
- (help (cat #helptext @askoptions-help))
- (choices #t_system #t_prefs #t_audio #t_userdoc #t_a-developer #t_d-developer)
- (default #default)
- ))
- ))
-
-
- ;**
- ;** Activate the AUDIO handler at boot time?
- ;**
-
- (set #dosdevpath "Devs:DOSDrivers")
-
- (if (and (bitand #parts #audio) (>= @user-level 1))
- (if (not (askbool
- (prompt #t_dosdriver)
- (help (cat #t_dosdriverhelp @askbool-help))
- (default 1)))
- (
- (set #dosdevpath "SYS:Storage/DOSDrivers")
- ))
- )
-
- ;**
- ;** Ask which languages should be installed
- ;**
-
- (set #deutsch 1
- #español 2
- #français 4
- #greek 8
- #íslenska 16
- #italiano 32
- #nederlands 64
- #norsk 128
- #português 256
- #svenska 512
- #suomi 1024
- )
-
- (set #t_deutsch "Deutsch"
- #t_español "Español"
- #t_français "Français"
- #t_greek "Greek"
- #t_íslenska "Íslenska"
- #t_italiano "Italiano"
- #t_nederlands "Nederlands"
- #t_norsk "Norsk"
- #t_português "Português"
- #t_svenska "Svenska"
- #t_suomi "Suomi"
- )
-
-
- (set #default 0)
-
- (if (not (exists "User/Catalogs/deutsch")) (set #t_deutsch ""))
- (if (not (exists "User/Catalogs/español")) (set #t_español ""))
- (if (not (exists "User/Catalogs/français")) (set #t_français ""))
- (if (not (exists "User/Catalogs/greek")) (set #t_greek ""))
- (if (not (exists "User/Catalogs/íslenska")) (set #t_íslenska ""))
- (if (not (exists "User/Catalogs/italiano")) (set #t_italiano ""))
- (if (not (exists "User/Catalogs/nederlands")) (set #t_nederlands ""))
- (if (not (exists "User/Catalogs/norsk")) (set #t_norsk ""))
- (if (not (exists "User/Catalogs/português")) (set #t_português ""))
- (if (not (exists "User/Catalogs/svenska")) (set #t_svenska ""))
- (if (not (exists "User/Catalogs/suomi")) (set #t_suomi ""))
-
- (if (and (exists "LOCALE:Languages/deutsch.language" (noreq)) (not (= #t_deutsch "")))
- (set #default (bitor #default #deutsch))
- )
- (if (and (exists "LOCALE:Languages/español.language" (noreq)) (not (= #t_español "")))
- (set #default (bitor #default #español))
- )
- (if (and (exists "LOCALE:Languages/français.language" (noreq)) (not (= #t_français "")))
- (set #default (bitor #default #français))
- )
- (if (and (exists "LOCALE:Languages/greek.language" (noreq)) (not (= #t_greek "")))
- (set #default (bitor #default #greek))
- )
- (if (and (exists "LOCALE:Languages/íslenska.language" (noreq)) (not (= #t_íslenska "")))
- (set #default (bitor #default #íslenska))
- )
- (if (and (exists "LOCALE:Languages/italiano.language" (noreq)) (not (= #t_italiano "")))
- (set #default (bitor #default #italiano))
- )
- (if (and (exists "LOCALE:Languages/nederlands.language" (noreq)) (not (= #t_nederlands "")))
- (set #default (bitor #default #nederlands))
- )
- (if (and (exists "LOCALE:Languages/norsk.language" (noreq)) (not (= #t_norsk "")))
- (set #default (bitor #default #norsk))
- )
- (if (and (exists "LOCALE:Languages/português.language" (noreq)) (not (= #t_portugues "")))
- (set #default (bitor #default #portugues))
- )
- (if (and (exists "LOCALE:Languages/svenska.language" (noreq)) (not (= #t_svenska "")))
- (set #default (bitor #default #svenska))
- )
- (if (and (exists "LOCALE:Languages/suomi.language" (noreq)) (not (= #t_suomi "")))
- (set #default (bitor #default #suomi))
- )
-
- (if (bitand #parts (bitor #system #prefs))
- (if (= @user-level 0)
- (
- (set #languages #default)
- )
- ( ; Average or Expert
- (set #languages (askoptions
- (prompt #t_languages)
- (help (cat #t_languageshelp @askoptions-help))
- (choices #t_deutsch #t_español #t_français
- #t_greek #t_íslenska #t_italiano #t_nederlands
- #t_norsk #t_português #t_svenska
- #t_suomi)
- (default #default)
- ))
- ))
- )
-
-
- ;**
- ;** Find out which drivers should be installed (if any)
- ;**
-
- (set #default #filesave)
- (set #drivers 0)
-
- (if (exists "Libs:delfina.library" (noreq))
- (set #default (bitor #default #delfina))
- )
- (if (<> (database "graphics-mem") 0) ; Test for not Draco...
- (set #default (bitor #default #paula))
- )
- (if (exists "Libs:prelude.library" (noreq))
- (set #default (bitor #default #prelude))
- )
- (if (exists "Libs:toccata.library" (noreq))
- (set #default (bitor #default #toccata))
- )
- (if (exists "Devs:dad_audio.device" (noreq))
- (set #default (bitor #default #wavetools))
- )
-
- (complete (/ #complete 10)) (set #complete (+ #complete #completeadd))
-
- (if (bitand #parts #system)
- (if (= @user-level 0)
- (
- (set #drivers #default)
- )
- ( ; Average or Expert
- (set #drivers (askoptions
- (prompt #t_drivers)
- (help (cat #t_drivershelp @askoptions-help))
- (choices "Delfina" "Filesave" "Paula" "Prelude" "Toccata" "Wavetools")
- (default #default)
- ))
- ))
- )
-
- ;**
- ;** Install 020-versions of the binaries?
- ;**
-
- (if (patmatch "68000|68010" (database "cpu"))
- (
- (set #ver68k ".000")
- )
- (
- (set #ver68k "")
- ))
-
- (complete (/ #complete 10)) (set #complete (+ #complete #completeadd))
-
- (if (and (bitand #parts #system) (= #ver68k "") (>= @user-level 1))
- (if (not (askbool
- (prompt #t_020ver)
- (help (cat #t_020verhelp @askbool-help))
- (default 1)))
- (
- (set #ver68k ".000")
- ))
- )
-
-
- ;**
- ;** Find out which developer files should be installed
- ;**
-
- (set #default (bitor #devdocs #source #asm #cgen #fd))
- (set #devfiles 0)
-
- (if (exists "ADE:" (noreq))
- (set #default (bitor #default #ade))
- )
-
- (if (exists "SC:" (noreq))
- (set #default (bitor #default #sas))
- )
-
- (if (exists "STORMC:" (noreq))
- (set #default (bitor #default #storm))
- )
-
- (if (exists "EMODULES:" (noreq))
- (set #default (bitor #default #e))
- )
-
- (complete (/ #complete 10)) (set #complete (+ #complete #completeadd))
-
- (if (bitand #parts (bitor #a-developer #d-developer))
- (
- (if (= @user-level 0)
- (
- (set #devfiles #default)
- )
- ( ; Average or Expert
- (set #devfiles (askoptions
- (prompt #t_devfiles)
- (help (cat #t_devfileshelp @askoptions-help))
- (choices #t_devdocs #t_source #t_asm #t_cgen #t_e #t_fd #t_ade #t_sas #t_storm )
- (default #default)
- ))
- ))
- ))
-
- ;**
- ;** Find out where the files should be installed
- ;**
-
- (set #devspath "Devs:")
- (set #cpath "C:")
- (set #prefspath "SYS:Prefs/")
- (set #lpath "L:")
- (set #localepath "Locale:")
-
- (set #incpath @default-dest)
- (set #adeincpath "ADE:include/")
- (set #sasincpath "Include:")
- (set #stormincpath "StormC:Include")
- (set #fdpath "FD:")
- (set #emodpath "EMODULES:")
-
- (if (exists #devspath (noreq)) (set #devspath (expandpath #devspath)))
- (if (exists #cpath (noreq)) (set #cpath (expandpath #cpath)))
- (if (exists #prefspath (noreq)) (set #prefspath (expandpath #prefspath)))
- (if (exists #lpath (noreq)) (set #lpath (expandpath #lpath)))
- (if (exists #localepath (noreq)) (set #localepath (expandpath #localepath)))
-
- (if (not (exists "Help:" (noreq)))
- (
- (if (bitand #parts #prefs)
- (set #userdocpath #prefspath)
- (set #userdocpath @default-dest)
- )
- )
- (
- (if (>= #osversion 38)
- (
- (set #userdocpath "Help:")
- ))
- ))
-
- (if (bitand #devfiles #ade)
- (
- (set #incpath "ADE:os-include/")
- ))
- (if (exists "Include:" (noreq))
- (
- (set #incpath "Include:")
- ))
-
- (if (= @user-level 0)
- (
- (if (and (bitand #parts #system) (not (exists #devspath (noreq))))
- (
- (abort #t_nodevs)
- ))
- (if (and (bitand #parts #system) (not (exists #cpath (noreq))))
- (
- (abort #t_noc)
- ))
- (if (and (bitand #parts #prefs) (not (exists #prefspath (noreq))))
- (
- (abort #t_noprefs)
- ))
- (if (and (bitand #parts #audio) (not (exists #lpath (noreq))))
- (
- (abort #t_nol)
- ))
-
- (set #srcpath (tackon @default-dest "AHI/"))
- (if (exists #srcpath)
- (
- (delete #srcpath
- (all)
- (optional "force")
- )
- ))
-
- (set #devdocspath (tackon #srcpath "docs/"))
- (if (= #userdocpath @default-dest)
- (
- (set #userdocpath #devdocspath)
- ))
- (if (= #incpath @default-dest)
- (
- (set #incpath (tackon #srcpath "include/"))
- ))
- (set #aincpath #incpath)
- (set #cincpath #incpath)
- (if (not (exists #sasincpath (noreq)))
- (
- (set #sasincpath #cincpath)
- ))
- (if (not (exists #stormincpath (noreq)))
- (
- (set #stormincpath #cincpath)
- ))
- (if (not (exists #fdpath (noreq)))
- (
- (set #fdpath (tackon #aincpath "fd/"))
- ))
- (if (not (exists #emodpath (noreq)))
- (
- (set #emodpath #cincpath)
- ))
-
- (makedir #srcpath (infos))
- (set @default-dest #srcpath)
-
- ; Match the number of completes in the 'else' section...
- (complete (/ #complete 10)) (set #complete (+ #complete (* 15 #completeadd)))
-
- )
- ( ; Average or Expert
-
- (complete (/ #complete 10)) (set #complete (+ #complete #completeadd))
-
- (if (and (bitand #parts #system)
- (or (not (exists #devspath (noreq))) (= @user-level 2) ))
- (
- (set #devspath (askdir
- (prompt #t_devspath)
- (help (cat #t_devspathhelp @askdir-help))
- (default #devspath)
- ))
- ))
-
- (complete (/ #complete 10)) (set #complete (+ #complete #completeadd))
-
- (if (and (bitand #parts #system)
- (or (not (exists #cpath (noreq))) (= @user-level 2) ))
- (
- (set #cpath (askdir
- (prompt #t_cpath)
- (help (cat #t_cpathhelp @askdir-help))
- (default #cpath)
- ))
- ))
-
- (complete (/ #complete 10)) (set #complete (+ #complete #completeadd))
-
- (if (and (<> #languages 0)
- (or (not (exists #localepath (noreq))) (= @user-level 2) ))
- (
- (set #localepath (askdir
- (prompt #t_localepath)
- (help (cat #t_localepathhelp @askdir-help))
- (default #localepath)
- ))
- ))
-
-
-
- (complete (/ #complete 10)) (set #complete (+ #complete #completeadd))
-
- (if (and (bitand #parts #prefs)
- (or (not (exists #prefspath (noreq))) (= @user-level 2) ))
- (
- (set #prefspath (askdir
- (prompt #t_prefspath)
- (help (cat #t_prefspathhelp @askdir-help))
- (default #prefspath)
- ))
- ))
-
- (complete (/ #complete 10)) (set #complete (+ #complete #completeadd))
-
- (if (and (bitand #parts #audio)
- (or (not (exists #lpath (noreq))) (= @user-level 2) ))
- (
- (set #lpath (askdir
- (prompt #t_lpath)
- (help (cat #t_lpathhelp @askdir-help))
- (default #lpath)
- ))
- ))
-
- (complete (/ #complete 10)) (set #complete (+ #complete #completeadd))
-
- (if (and (bitand #parts #audio)
- (or (not (exists #dosdevpath (noreq))) (= @user-level 2) ))
- (
- (set #dosdevpath (askdir
- (prompt #t_dosdevpath)
- (help (cat #t_dosdevpathhelp @askdir-help))
- (default #dosdevpath)
- ))
- ))
-
- (complete (/ #complete 10)) (set #complete (+ #complete #completeadd))
-
- (if (and (bitand #parts #userdoc)
- (or (= #userdocpath @default-dest) (= @user-level 2) ))
- (
- (set #userdocpath (askdir
- (prompt #t_userdocpath)
- (help (cat #t_userdocpathhelp @askdir-help))
- (default #userdocpath)
- ))
- ))
-
- (complete (/ #complete 10)) (set #complete (+ #complete #completeadd))
-
- (if (bitand #devfiles #source)
- (
- (set #srcpath (askdir
- (prompt #t_srcpath)
- (help (cat #t_srcpathhelp @askdir-help))
- (default @default-dest)
- ))
- (set #srcpath (tackon #srcpath "AHI/"))
- (if (exists #srcpath)
- (
- (delete #srcpath
- (all)
- (confirm average)
- (optional "force")
- (prompt #t_oldsrc)
- (help #t_nohelp)
- )
- ))
- (makedir #srcpath (infos))
- (set @default-dest #srcpath)
- ))
-
- (complete (/ #complete 10)) (set #complete (+ #complete #completeadd))
-
- (if (bitand #devfiles #devdocs)
- (
- (set #devdocspath (askdir
- (prompt #t_devdocspath)
- (help (cat #t_devdocspathhelp @askdir-help))
- (default (tackon @default-dest "docs/"))
- (newpath)
- ))
- ))
-
- (complete (/ #complete 10)) (set #complete (+ #complete #completeadd))
-
- (if (bitand #devfiles #asm)
- (
- (set #aincpath (askdir
- (prompt #t_aincpath)
- (help (cat #t_aincpathhelp @askdir-help))
- (default #incpath)
- ))
-
- ))
-
- (complete (/ #complete 10)) (set #complete (+ #complete #completeadd))
-
- (if (bitand #devfiles #fd)
- (
- (if (not (exists #fdpath (noreq)))
- (
- (set #fdpath (tackon #aincpath "fd/"))
- ))
- (set #fdpath (askdir
- (prompt #t_fdpath)
- (help (cat #t_fdpathhelp @askdir-help))
- (default #fdpath)
- ))
- ))
-
- (complete (/ #complete 10)) (set #complete (+ #complete #completeadd))
-
- (if (bitand #devfiles #cgen)
- (
- (set #cincpath (askdir
- (prompt #t_cincpath)
- (help (cat #t_cincpathhelp @askdir-help))
- (default #incpath)
- ))
- ))
-
- (complete (/ #complete 10)) (set #complete (+ #complete #completeadd))
-
- (if (bitand #devfiles #e)
- (
- (set #emodpath (askdir
- (prompt #t_emodpath)
- (help (cat #t_emodpathhelp @askdir-help))
- (default #emodpath)
- ))
- ))
-
- (complete (/ #complete 10)) (set #complete (+ #complete #completeadd))
-
- (if (bitand #devfiles #ade)
- (
- (set #adeincpath (askdir
- (prompt #t_adeincpath)
- (help (cat #t_adeincpathhelp @askdir-help))
- (default #adeincpath)
- ))
- ))
-
- (complete (/ #complete 10)) (set #complete (+ #complete #completeadd))
-
- (if (bitand #devfiles #sas)
- (
- (set #sasincpath (askdir
- (prompt #t_sasincpath)
- (help (cat #t_sasincpathhelp @askdir-help))
- (default #sasincpath)
- ))
- ))
-
- (complete (/ #complete 10)) (set #complete (+ #complete #completeadd))
-
- (if (bitand #devfiles #storm)
- (
- (set #stormincpath (askdir
- (prompt #t_stormincpath)
- (help (cat #t_stormincpathhelp @askdir-help))
- (default #stormincpath)
- ))
- ))
- ))
-
-
- ;******************************************************************************
- ;**** Install *****************************************************************
- ;******************************************************************************
-
-
- ;**
- ;** Install the prefs program
- ;**
-
- (complete (/ #complete 10)) (set #complete (+ #complete #completeadd))
- (if (bitand #parts #prefs)
- (
- (copylib
- (help (cat #t_prefspathhelp @copylib-help))
- (prompt #t_installing "AHI")
- (source "User/Prefs/AHI")
- (dest #prefspath)
- (confirm)
- (infos)
- (noposition)
- )
- (protect (tackon #cpath "AHI") "+e")
-
- (set @default-dest #prefspath)
- ))
-
- ;**
- ;** Install the audio handler
- ;**
-
- (complete (/ #complete 10)) (set #complete (+ #complete #completeadd))
- (if (bitand #parts #audio)
- (
- (copylib
- (help (cat #t_lpathhelp @copylib-help))
- (prompt #t_installing "AHI-Handler")
- (source "User/L/AHI-Handler")
- (dest #lpath)
- (confirm)
- (infos)
- (noposition)
- )
- (protect (tackon #lpath "AHI-Handler") "+e")
-
- (copylib
- (help (cat #t_dosdevpathhelp @copylib-help))
- (prompt #t_installing "AUDIO")
- (source "User/Devs/DOSDrivers/AUDIO")
- (dest #dosdevpath)
- (confirm)
- (infos)
- (noposition)
- )
-
- (set @default-dest #lpath)
- ))
-
- ;**
- ;** Install the user documentation
- ;**
-
- (complete (/ #complete 10)) (set #complete (+ #complete #completeadd))
- (if (bitand #parts #userdoc)
- (
- (copyfiles
- (help (cat #t_userdocpathhelp @copylib-help))
- (prompt #t_installing "ahi.guide")
- (source "User/Help/ahi.guide")
- (dest #userdocpath)
- (infos)
- (noposition)
- )
-
- (set @default-dest #userdocpath)
- ))
-
-
- ;**
- ;** Install ahi.device, AddAudioModes and drivers
- ;**
-
- (complete (/ #complete 10)) (set #complete (+ #complete #completeadd))
- (if (bitand #parts #system)
- (
-
- ;** ahi.device
- (copylib
- (help (cat #t_ahidevhelp @copylib-help))
- (prompt (cat #t_installing "ahi.device" #ver68k))
- (source (cat "User/Devs/ahi.device" #ver68k))
- (dest #devspath)
- (newname "ahi.device")
- (confirm)
- )
-
- ;** AddAudioModes
- (copylib
- (help (cat #t_cpathhelp @copylib-help))
- (prompt #t_installing "AddAudioModes")
- (source "User/C/AddAudioModes")
- (dest #cpath)
- (confirm)
- )
- (protect (tackon #cpath "AddAudioModes") "+e")
-
- ;** Drivers
-
- (if (bitand #drivers #delfina)
- (P_INSTDRIVER "delfina.audio" "DELFINA")
- )
- (if (bitand #drivers #filesave)
- (P_INSTDRIVER "filesave.audio" "FILESAVE")
- )
- (if (bitand #drivers #paula)
- (P_INSTDRIVER "paula.audio" "PAULA")
- )
- (if (bitand #drivers #prelude)
- (P_INSTDRIVER "prelude.audio" "PRELUDE")
- )
- (if (bitand #drivers #toccata)
- (P_INSTDRIVER "toccata.audio" "TOCCATA")
- )
- (if (bitand #drivers #wavetools)
- (P_INSTDRIVER "wavetools.audio" "WAVETOOLS")
- )
-
- (run (cat (tackon #cpath "AddAudioModes") " REMOVE")
- (prompt #t_runaddmodes)
- (help #t_nohelp)
- (confirm)
- )
-
- (set @default-dest #devspath)
- ))
-
-
- ;**
- ;** Install the catalogs
- ;**
-
- (complete (/ #complete 10)) (set #complete (+ #complete #completeadd))
- (if (bitand #parts (bitor #system #prefs))
- (
- ;** Catalogs
- (if (bitand #languages #deutsch)
- (P_INSTCATALOG #t_deutsch)
- )
- (if (bitand #languages #español)
- (P_INSTCATALOG #t_español)
- )
- (if (bitand #languages #français)
- (P_INSTCATALOG #t_français)
- )
- (if (bitand #languages #greek)
- (P_INSTCATALOG #t_greek)
- )
- (if (bitand #languages #íslenska)
- (P_INSTCATALOG #t_íslenska)
- )
- (if (bitand #languages #italiano)
- (P_INSTCATALOG #t_italiano)
- )
- (if (bitand #languages #nederlands)
- (P_INSTCATALOG #t_nederlands)
- )
- (if (bitand #languages #norsk)
- (P_INSTCATALOG #t_norsk)
- )
- (if (bitand #languages #português)
- (P_INSTCATALOG #t_português)
- )
- (if (bitand #languages #svenska)
- (P_INSTCATALOG #t_svenska)
- )
- (if (bitand #languages #suomi)
- (P_INSTCATALOG #t_suomi)
- )
- ))
-
- ;**
- ;** Install the autodocs
- ;**
-
- (complete (/ #complete 10)) (set #complete (+ #complete #completeadd))
- (if (bitand #devfiles #devdocs)
- (
- (if (bitand #parts #a-developer)
- (set #pattern "~(#?sub#?)"))
-
- (if (bitand #parts #d-developer)
- (set #pattern "(#?sub#?)"))
-
- (if (and (bitand #parts #a-developer) (bitand #parts #d-developer))
- (set #pattern "#?"))
-
- (makedir #devdocspath)
- (copyfiles
- (help @copylib-help)
- (prompt #t_installingdocs )
- (source "Developer/docs/")
- (dest #devdocspath)
- (pattern #pattern)
- (confirm average)
- (infos)
- (noposition)
- )
-
- (set @default-dest #devdocspath)
- ))
-
- ;**
- ;** Install the include files
- ;**
-
- (complete (/ #complete 10)) (set #complete (+ #complete #completeadd))
- (if (bitand #devfiles #fd)
- (
- (copyfiles
- (help @copylib-help)
- (prompt #t_installingincs)
- (source "Developer/Include/FD")
- (dest #fdpath)
- (all)
- )
-
- (set @default-dest #fdpath)
- ))
-
- (complete (/ #complete 10)) (set #complete (+ #complete #completeadd))
- (if (bitand #devfiles #asm)
- (
- (copyfiles
- (help @copylib-help)
- (prompt #t_installingincs)
- (source "Developer/include/Asm")
- (dest #aincpath)
- (all)
- )
- (set @default-dest #aincpath)
- ))
-
- (complete (/ #complete 10)) (set #complete (+ #complete #completeadd))
- (if (bitand #devfiles #cgen)
- (
- (copyfiles
- (help @copylib-help)
- (prompt #t_installingincs)
- (source "Developer/Include/C")
- (dest #cincpath)
- (all)
- )
-
- (set @default-dest #cincpath)
- ))
-
- (complete (/ #complete 10)) (set #complete (+ #complete #completeadd))
- (if (bitand #devfiles #e)
- (
- (copyfiles
- (help @copylib-help)
- (prompt #t_installingincs)
- (source "Developer/Include/E")
- (dest #emodpath)
- (all)
- )
-
- (set @default-dest #emodpath)
- ))
-
- (complete (/ #complete 10)) (set #complete (+ #complete #completeadd))
- (if (bitand #devfiles #ade)
- (
- (copyfiles
- (help @copylib-help)
- (prompt #t_installingincs)
- (source "Developer/Include/ADE")
- (dest #adeincpath)
- (all)
- )
-
- (set @default-dest #adeincpath)
- ))
-
- (complete (/ #complete 10)) (set #complete (+ #complete #completeadd))
- (if (bitand #devfiles #sas)
- (
- (copyfiles
- (help @copylib-help)
- (prompt #t_installingincs)
- (source "Developer/Include/SAS")
- (dest #sasincpath)
- (all)
- )
-
- (set @default-dest #sasincpath)
- ))
-
- (complete (/ #complete 10)) (set #complete (+ #complete #completeadd))
- (if (bitand #devfiles #storm)
- (
- (copyfiles
- (help @copylib-help)
- (prompt #t_installingincs)
- (source "Developer/Include/Storm")
- (dest #stormincpath)
- (all)
- )
-
- (set @default-dest #stormincpath)
- ))
-
- ;**
- ;** Install the examples
- ;**
-
- (complete (/ #complete 10)) (set #complete (+ #complete #completeadd))
- (if (bitand #devfiles #source)
- (
- (if (bitand #parts #a-developer)
- (
- (makedir (tackon #srcpath "examples/"))
- (copyfiles
- (help @copylib-help)
- (prompt #t_installingsrc)
- (source "Developer/examples")
- (dest (tackon #srcpath "examples/"))
- (all)
- )
- ))
- (if (bitand #parts #d-developer)
- (
- (makedir (tackon #srcpath "drivers/"))
- (copyfiles
- (help @copylib-help)
- (prompt #t_installingsrc)
- (source "Developer/drivers")
- (dest (tackon #srcpath "drivers/"))
- (all)
- )
- (makedir (tackon #srcpath "support/"))
- (copyfiles
- (help @copylib-help)
- (prompt #t_installingsrc)
- (source "Developer/support")
- (dest (tackon #srcpath "support/"))
- (all)
- )
- ))
- (if (bitand #parts (bitor #a-developer #d-developer))
- (
- (copyfiles
- (help @copylib-help)
- (prompt #t_installingsrc)
- (source "")
- (dest #srcpath)
- (pattern "(COPYRIGHT|HISTORY|VERSION|ahi.readme)#?")
- )
- ))
-
- (set @default-dest #srcpath)
- ))
-
-
-
-
- (complete 100)
- (exit)
-